package com.anivia.system.auth.model.dto;

import com.anivia.system.auth.enums.SwitchStatusEnum;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 用户基础信息
 * </p>
 *
 * @author wangj
 * @since 2024-04-02
 */
@Getter
@Setter
@TableName("user_info")
public class UserInfoAddOrUpdateDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Schema(description = "id，更新时必传，新增时不传")
    private Integer id;

    /**
     * 手机号
     */
    @Schema(description = "手机号")
    @NotBlank(message = "手机号不能为空")
    private String phone;

    /**
     * 姓名
     */
    @Schema(description = "姓名")
    @NotBlank(message = "姓名不能为空")
    private String userName;

    /**
     * 密码
     */
    @Schema(description = "密码")
    @NotBlank(message = "密码不能为空")
    private String password;

    /**
     * 所属部门id
     */
    @Schema(description = "所属部门id")
    @NotNull(message = "所属部门不能为空")
    private Integer deptId;

    /**
     * 角色id集合
     */
    @Schema(description = "角色id")
    @NotEmpty(message = "角色不能为空")
    private List<Integer> roleIds;

    /**
     * 状态
     */
    @Schema(description = "状态")
    @NotNull(message = "状态不能为空")
    private SwitchStatusEnum status;
}
